package com.leather.admin.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.leather.admin.entity.Permission;
import com.leather.admin.vo.PermissionVo;
import com.leather.common.result.Result;

import java.util.List;

public interface PermissionService extends IService<Permission> {


    /**
     * 增加权限
     * @param permissionVo
     * @return
     */
    Result addPermission(PermissionVo permissionVo);


    /**
     * 根据权限名获取permission
     * @param permissionName
     * @return
     */
    Permission getPermissionByName(String permissionName);

    IPage<Permission> getAllPermission(Page<Permission> page, String sort, String search);

    List<Permission> getParent();

    Result updatePermission(PermissionVo permissionVo);
}
